package my.merborn.ordersysteam105.models.services;

import my.merborn.ordersysteam105.models.pojo.OrderT;
import my.merborn.ordersysteam105.models.pojo.User;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface OrderService {
    //insert
    public OrderT createNewOrder(User user, String data);

    //select
    public List<OrderT> selectALL();
    public List<OrderT> selectNoPayed(Integer uid);
    public List<OrderT> selectByPageable(Pageable pageable);
    public List<OrderT> selectNoPayedAndNoFinishedByPageable(Pageable pageable);

    //update
    public int updateOrder(OrderT order, String data);

    //delete
    public int dropOrder(OrderT order);

    //service
    public double payIt(OrderT order);
    public boolean isPayed(OrderT order);
    public List<OrderT> selectNoPayedAndNoFinished();
    public int finishIt(OrderT order);



}
